package com.grechur.wanandroidcompose.http.service

import com.grechur.wanandroidcompose.bean.article.ArticlesBean
import com.grechur.wanandroidcompose.bean.project.ProjectBean
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

interface ProjectService {

    /**
     * 获取新闻数据
     */
//    @GET("/tree/json")
//   fun getProjectTitles(): Call<ProjectBean?>

    @GET("/tree/json")
    suspend fun getProjectTitles(): ProjectBean?

//    @GET("/article/list/{index}/json")
//    fun getProjectArticle(@Path("index") index: Int?,@Query("cid") cid:String?): Call<ArticlesBean?>

    @GET("/article/list/{index}/json")
    suspend fun getProjectArticle(@Path("index") index: Int?,@Query("cid") cid:String?): ArticlesBean?
}
